﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using System.Threading.Tasks;
using LevelEditor.Objects;
using LevelEditor.Objects.Waypoints;
using LevelEditor.Objects.Tiles;
using LevelEditor.Dao;
using DialogsEditor;
using System.Drawing;

namespace LevelEditor.App.Serialization
{
    public class STile
    {
        private int id;
        [XmlElement("ID")]
        public int ID
        {
            get { return id; }
            set { id = value; }
        }

        private Tile.TileType type;
        [XmlElement("Type")]
        public Tile.TileType myType
        {
            get { return type; }
            set { type = value; }
        }

        private string name;
        [XmlElement("Name")]
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        private string imageInfo;
        [XmlElement("ImageInfo")]
        public string ImageInfo
        {
            get { return imageInfo; }
            set { imageInfo = value; }
        }

        private int positionX;
        [XmlElement("PositionX")]
        public int PositionX
        {
            get { return positionX; }
            set { positionX = value; }
        }


        private int positionY;
        [XmlElement("PositionY")]
        public int PositionY
        {
            get { return positionY; }
            set { positionY = value; }
        }

        [XmlArray("MyTrigger")]
        [XmlArrayItem("Trigger")]
        public List<STrigger> myTriggers;

        [XmlArray("StandAloneBehaviors")]
        [XmlArrayItem("behavior")]
        public List<SBehavior> standAloneBehaviors;

        public STile()
        {
            myTriggers = new List<STrigger>();
        }
    }
}
